#define _CRT_SECURE_NO_WARNINGS 1
#include"heap.h"
void Heap1(HP* hp)
{
	HeapInit(hp);
	HeapPush(hp, 1);
	HeapPush(hp, 2);
	HeapPush(hp, 4);
	HeapPush(hp, 3);
	HeapPush(hp, 5);
	HeapPrint(hp);
	HeapPop(hp);
	HeapPrint(hp);
}

void MainTopK()
{
	srand((unsigned int)time(NULL));
	int a[10000] = {0};
	for (int i = 0; i < 10000; i++)
	{
		a[i] = rand() % 10000;
	}
	a[5] = 10001;
	a[100] = 10002;
	a[300] = 10005;
	a[600] = 10007;
	a[1000] = 10003;
	a[1001] = 10009;
	a[1200] = 10000;
	a[2000] = 10004;
	a[5000] = 10008;
	a[9999] = 10006;
	PrintTopK(a, 10000, 10);
}

void MainHeapSort()
{
	int a[7] = { 5,2,6,4,1,7,3 };
	HeapSort(a, 7);
	for (int i = 0; i < 7; i++)
	{
		printf("%d ", a[i]);
	}
	printf("\n");
}
int main()
{
	//HP hp;
	//Heap1(&hp);
	//MainTopK();
	MainHeapSort();
	return 0;
}